var $sort = {
	
	data: null,
	
	//取得数据内容	
	get_data: function()
	{
		if($sort.data)	return $sort.data;
		var $sql = "SELECT * FROM law_sort";
		var $temp = $db.fetch_all($sql);
		if(!$temp) return {};
		
		var $data = {};
		$.each($temp, function(k, v) {
			$data[v.id] = v.name;
		});
		$sort.data = $data;
		return $data;
		

	},
	
	//在页面上展示内容
	display: function()
	{
		var $data = $sort.get_data();
		if(!$data)	return false;
		var $html = "<li sortid=''><a href='###'>全部</a></li>";
		$.each($data, function(k, v){
			$html += "<li sortid='"+ k +"'><a href='###'>"+ v +"</a></li>";
		});
		$("#sort").html($html).children("li").click(function(){
			$article.get_list($(this).attr("sortid"));
		});
		delete $html;
		return true;
	}
	
};